import Http from '@/http'
export function queryFreePayApi() {
    return Http.get('user/free/pay/status')
}

export function balanceListApi(){
    return Http.get('user/balance/list')
}

export function authApi(data) {
    return Http.post('user/auth', data)
}

export function uploadAvatarApi(avatar) {
    return Http.uploadFile('user/upload/avatar', {name:'avatar', path : avatar})
}

export function uploadAlbumsApi(pic:string) {
    return Http.uploadFile('user/upload/albums', {name:'pic', path : pic})
}

export function delAlbumsApi(index:number) {
    return Http.delete('user/albums/del', {index})
}


export function updateBaseInfoApi(data) {
    return Http.post('user/update/baseinfo', data)
}

export function getBaseInfoApi() {
    return Http.get('user/baseinfo')
}

export function uploadAvatarNicknameApi(avatar,nickname) {
    return Http.uploadFile('user/upload/info', {name:'avatar', path : avatar}, {nickname})
}

export function updateInfoApi(data:ay) {
    return Http.post('user/update/info', data)
}
